<?php

/**
 * Entity class for active table
 *
 * @Entity(repositoryClass="GameRepository")
 * @Table(name="game")
 * 
 * @author alexogar
 *
 */
class Game {

    /**
     * @Id 
     * @Column(type="string") 
     */
    private $id;
    
    /**     
     * @Column(type="boolean")
     */
    private $online;
    
    /**     
     * @ManyToOne(targetEntity="Player",cascade={"remove"})
     * @JoinColumn(name="owner_id", referencedColumnName="id", nullable=false)
     */
    private $owner;
    
    /**     
     * @ManyToOne(targetEntity="Player")
     * @JoinColumn(name="guest_id", referencedColumnName="id", nullable=true)
     */
    private $guest;
    
    /**     
     * @Column(type="datetime", nullable=false)
     */
    private $startDate;
    
    /**     
     * @Column(type="datetime")
     */
    private $updateDate;
    
    /**     
     * @Column(type="datetime", nullable=true)
     */
    private $endDate;
    
    /**     
     * @Column(type="string", nullable=false)
     */
    private $updateHash;
    
    /**     
     * @Column(type="string", nullable=false)
     */
    private $status;
    
    /**
     * @OneToOne(targetEntity="Board", inversedBy="game")
     * @JoinColumn(name="board_id", referencedColumnName="id")
     */
    private $board;

    /**
     * @return the $id
     */
    public function getId() {
        return $this->id;
    }
    
    /**
     * @param field_type $id
     */
    public function setId($id) {
        $this->id = $id;
    }
    
    public function getOnline() {
        return $this->online;
    }

    public function setOnline($online) {
        $this->online = $online;
    }

    public function getOwner() {
        return $this->owner;
    }

    public function setOwner($owner) {
        $this->owner = $owner;
    }

    public function getGuest() {
        return $this->guest;
    }

    public function setGuest($guest) {
        $this->guest = $guest;
    }

    public function getStartDate() {
        return $this->startDate;
    }

    public function setStartDate($startDate) {
        $this->startDate = $startDate;
    }

    public function getEndDate() {
        return $this->endDate;
    }

    public function setEndDate($endDate) {
        $this->endDate = $endDate;
    }

    public function getUpdateHash() {
        return $this->updateHash;
    }

    public function setUpdateHash($updateHash) {
        $this->updateHash = $updateHash;
    }

    public function getStatus() {
        return $this->status;
    }

    public function setStatus($status) {
        $this->status = $status;
    }
    
    public function getBoard() {
        return $this->board;
    }

    public function setBoard($board) {
        $this->board = $board;
    }

    public function getUpdateDate() {
        return $this->updateDate;
    }

    public function setUpdateDate($updateDate) {
        $this->updateDate = $updateDate;
    }

}

?>